<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- slot标签的内部是可以写内容的，里面写的内容会作为插槽的默认值 -->
      <h3>插槽后备内容</h3>
      <child>888</child>
    </div>

    <script src="../Vue.js"></script>
    <script>
      const Child = {
        template: `
          <div><slot><span>666</span></slot> - child组件</div>
        `,
      };
      new Vue({
        el: "#app",
        data: {},
        components: {
          Child,
        },
      });
    </script>
  </body>
</html>
